package smartclass.fragment;

import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jeremyfeinstein.slidingmenu.example.R;

@SuppressLint("ValidFragment")
public class StudentDrawFragment extends Fragment {
	private Context context;
	public static ActionBar actionBar;

	// private static StudentDrawFragment studentDrawFragment;

	public StudentDrawFragment(Context context) {
		this.context = context;
	}

	// @SuppressLint("CommitTransaction")
	// FragmentTransaction frag = ((FragmentActivity)
	// context).getSupportFragmentManager()
	// .beginTransaction();

	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		// frag.replace(R.id.about, StudentDrawFragment.getInstance());
	}

	@SuppressLint("NewApi")
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		actionBar = ((Activity) context).getActionBar();
		actionBar.setDisplayHomeAsUpEnabled(true);
		actionBar.setHomeButtonEnabled(true);
		View v = inflater.inflate(R.layout.student_fragment_draw, container,
				false);

		return v;
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
	}

	@Override
	public void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		((Activity) context).setTitle("Smart Class");
	}

}
